#include "uawidget.h"


 void UAWidget::setUserAgent(TabWidget *tab,const int &name)
{
    switch (name) {
    case Chrome:
          tab->getProfile()->setHttpUserAgent("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36");
        break;
    case Opera:
          tab->getProfile()->setHttpUserAgent("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36 OPR/38.0.2220.41");
        break;
    case Safari:
          tab->getProfile()->setHttpUserAgent("Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1");
        break;
    case IE:
           tab->getProfile()->setHttpUserAgent("Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)");
        break;
    case Bot:
          tab->getProfile()->setHttpUserAgent("Googlebot/2.1 (+http://www.google.com/bot.html)");
        break;
    default:
        break;
    }
}
